package com.huanlis.cloud.controller;

import com.huanlis.cloud.utils.R;
import org.apache.activemq.command.ActiveMQMessage;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jms.core.JmsMessagingTemplate;
import org.springframework.jms.core.JmsTemplate;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.jms.Message;
import javax.jms.TextMessage;

/**
 * @author lihuan
 * @since 2024/06/26 21:19:23
 */
@RestController
public class ProviderController {

    @Autowired
    private JmsTemplate jmsTemplate;

    @PostMapping("/provide")
    public R send(@RequestParam("msg") String msg) {
        jmsTemplate.convertAndSend("test", "123534252345");
        return R.success();
    }

}
